pvh: tolerate HVM guests having no ioreq page
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 13 Nov 2013 08:29:02 +0000 (09:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 13 Nov 2013 08:29:02 +0000 (09:29 +0100)
commit68209bce0f551dcae991877ffd58211498bb0755
treeff2930b3515550b5b3eb9496ceec3e2df89e5ba4
parent033331ea3c0a510ab682697d0eef9d69e35c80ec
pvh: tolerate HVM guests having no ioreq page

PVH guests don't have a backing device model emulator (qemu); just
tolerate this situation explicitly, rather than special-casing PVH.

For unhandled IO, hvmemul_do_io() will now return X86EMUL_OKAY, which
is I believe what would be the effect if qemu didn't have a handler
for the IO.

This also fixes a potetial DoS in the host from the reworked series:
If the guest makes a hypercall which sends an invalidate request, it
would have crashed the host.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: Eddie Dong <eddie.dong@intel.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/io.c
xen/include/asm-x86/hvm/io.h
xen/include/asm-x86/hvm/support.h